package com.yj.springbootaop.jdkproxy;

import java.lang.reflect.Proxy;

public class JdkProxyFactory {

    public static Object getProxyObject(Object o){
        SmsServiceImpl smsService = new SmsServiceImpl();
        return Proxy.newProxyInstance(
                o.getClass().getClassLoader(),
                o.getClass().getInterfaces(),
                new MyInvocationHandler(smsService));

    }

}
